# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Testing.V1.Model.AndroidModel do
  @moduledoc """
  A description of an Android device tests may be run on.

  ## Attributes

  *   `accessDeniedReasons` (*type:* `list(String.t)`, *default:* `nil`) - Reasons for access denial. This model is accessible if this list is empty, otherwise the model is viewable only.
  *   `brand` (*type:* `String.t`, *default:* `nil`) - The company that this device is branded with. Example: "Google", "Samsung".
  *   `codename` (*type:* `String.t`, *default:* `nil`) - The name of the industrial design. This corresponds to android.os.Build.DEVICE.
  *   `form` (*type:* `String.t`, *default:* `nil`) - Whether this device is virtual or physical.
  *   `formFactor` (*type:* `String.t`, *default:* `nil`) - Whether this device is a phone, tablet, wearable, etc.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The unique opaque id for this model. Use this for invoking the TestExecutionService.
  *   `labInfo` (*type:* `GoogleApi.Testing.V1.Model.LabInfo.t`, *default:* `nil`) - Output only. Lab info of this device.
  *   `lowFpsVideoRecording` (*type:* `boolean()`, *default:* `nil`) - True if and only if tests with this model are recorded by stitching together screenshots. See use_low_spec_video_recording in device config.
  *   `manufacturer` (*type:* `String.t`, *default:* `nil`) - The manufacturer of this device.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The human-readable marketing name for this device model. Examples: "Nexus 5", "Galaxy S5".
  *   `perVersionInfo` (*type:* `list(GoogleApi.Testing.V1.Model.PerAndroidVersionInfo.t)`, *default:* `nil`) - Version-specific information of an Android model.
  *   `screenDensity` (*type:* `integer()`, *default:* `nil`) - Screen density in DPI. This corresponds to ro.sf.lcd_density
  *   `screenX` (*type:* `integer()`, *default:* `nil`) - Screen size in the horizontal (X) dimension measured in pixels.
  *   `screenY` (*type:* `integer()`, *default:* `nil`) - Screen size in the vertical (Y) dimension measured in pixels.
  *   `supportedAbis` (*type:* `list(String.t)`, *default:* `nil`) - The list of supported ABIs for this device. This corresponds to either android.os.Build.SUPPORTED_ABIS (for API level 21 and above) or android.os.Build.CPU_ABI/CPU_ABI2. The most preferred ABI is the first element in the list. Elements are optionally prefixed by "version_id:" (where version_id is the id of an AndroidVersion), denoting an ABI that is supported only on a particular version.
  *   `supportedVersionIds` (*type:* `list(String.t)`, *default:* `nil`) - The set of Android versions this device supports.
  *   `tags` (*type:* `list(String.t)`, *default:* `nil`) - Tags for this dimension. Examples: "default", "preview", "deprecated".
  *   `thumbnailUrl` (*type:* `String.t`, *default:* `nil`) - URL of a thumbnail image (photo) of the device.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :accessDeniedReasons => list(String.t()) | nil,
          :brand => String.t() | nil,
          :codename => String.t() | nil,
          :form => String.t() | nil,
          :formFactor => String.t() | nil,
          :id => String.t() | nil,
          :labInfo => GoogleApi.Testing.V1.Model.LabInfo.t() | nil,
          :lowFpsVideoRecording => boolean() | nil,
          :manufacturer => String.t() | nil,
          :name => String.t() | nil,
          :perVersionInfo => list(GoogleApi.Testing.V1.Model.PerAndroidVersionInfo.t()) | nil,
          :screenDensity => integer() | nil,
          :screenX => integer() | nil,
          :screenY => integer() | nil,
          :supportedAbis => list(String.t()) | nil,
          :supportedVersionIds => list(String.t()) | nil,
          :tags => list(String.t()) | nil,
          :thumbnailUrl => String.t() | nil
        }

  field(:accessDeniedReasons, type: :list)
  field(:brand)
  field(:codename)
  field(:form)
  field(:formFactor)
  field(:id)
  field(:labInfo, as: GoogleApi.Testing.V1.Model.LabInfo)
  field(:lowFpsVideoRecording)
  field(:manufacturer)
  field(:name)
  field(:perVersionInfo, as: GoogleApi.Testing.V1.Model.PerAndroidVersionInfo, type: :list)
  field(:screenDensity)
  field(:screenX)
  field(:screenY)
  field(:supportedAbis, type: :list)
  field(:supportedVersionIds, type: :list)
  field(:tags, type: :list)
  field(:thumbnailUrl)
end

defimpl Poison.Decoder, for: GoogleApi.Testing.V1.Model.AndroidModel do
  def decode(value, options) do
    GoogleApi.Testing.V1.Model.AndroidModel.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Testing.V1.Model.AndroidModel do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
